home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / dev / mui / urltext.lha / Urltext / Sources / mcc / macros.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-01-25  |  1.6 KB  |  87 lines

  1. #ifndef _MACROS_H
  2. #define _MACROS_H
  3.  
  4. #ifndef EXEC_LIBRARIES_H
  5. #include <exec/libraries.h>
  6. #endif
  7.  
  8. #ifndef EXEC_SEMAPHORES_H
  9. #include <exec/semaphores.h>
  10. #endif
  11.  
  12. #ifndef DOS_DOS_H
  13. #include <dos/dos.h>
  14. #endif
  15.  
  16.  
  17. /****************************************************************************/
  18.  
  19. #ifndef SAVEDS
  20. #define SAVEDS  __saveds
  21. #endif
  22.  
  23. #ifndef ASM
  24. #define ASM     __asm
  25. #endif
  26.  
  27. #ifndef REGARGS
  28. #define REGARGS __regargs
  29. #endif
  30.  
  31. #ifndef STDARGS
  32. #define STDARGS __stdargs
  33. #endif
  34.  
  35. #ifndef INLINE
  36. #define INLINE __inline
  37. #endif
  38.  
  39. #ifndef REG
  40. #define REG(x)  register __ ## x
  41. #endif
  42.  
  43. #ifndef NODE
  44. #define NODE(a) ((struct Node *)(a))
  45. #endif
  46.  
  47. #ifndef MINNODE
  48. #define MINNODE(a) ((struct MinNode *)(a))
  49. #endif
  50.  
  51. #ifndef LIST
  52. #define LIST(a) ((struct List *)(a))
  53. #endif
  54.  
  55. #ifndef MINLIST
  56. #define MINLIST(a) ((struct MinList *)(a))
  57. #endif
  58.  
  59. #ifndef MESSAGE
  60. #define MESSAGE(m) ((struct Message *)(m))
  61. #endif
  62.  
  63. #ifndef NEWLIST
  64. #define NEWLIST(l) (LIST(l)->lh_Head = NODE(&LIST(l)->lh_Tail), \
  65.                     LIST(l)->lh_Tail = NULL, \
  66.                     LIST(l)->lh_TailPred = NODE(&LIST(l)->lh_Head))
  67. #endif
  68.  
  69. #ifndef INITPORT
  70. #define INITPORT(p,s) ((p)->mp_Flags = PA_SIGNAL, \
  71.                        (p)->mp_SigBit = (UBYTE)(s), \
  72.                        (p)->mp_SigTask = FindTask(NULL), \
  73.                        NEWLIST(&((p)->mp_MsgList)))
  74. #endif
  75.  
  76. #ifndef INITMESSAGE
  77. #define INITMESSAGE(m,p,l) (MESSAGE(m)->mn_Node.ln_Type = NT_MESSAGE, \
  78.                             MESSAGE(m)->mn_ReplyPort = (p), \
  79.                             MESSAGE(m)->mn_Length = (l))
  80. #endif
  81.  
  82. #define debug kprintf
  83.  
  84. /****************************************************************************/
  85.  
  86. #endif /* _MACROS_H */
  87.